package com.yzf.wisecoder.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yzf.wisecoder.wisecodercommon.response.Page;

/**
 * @author jianghuiyong
 * @ClassName: BaseController
 * @description: 基础控制类
 * @date 2019/6/18 18:29
 */
public class BaseController {

    public <T> void copyBean(IPage<T> source, Page<T> target) {
        target.setTotalPage(source.getPages()).setCurrent(source.getCurrent()).setList(source.getRecords())
                .setTotal(source.getTotal()).setPageSize(source.getSize());
    }
}
